Skip to content

Improve mobile responsiveness across UI components and layouts#61

Merged
antosubash merged 17 commits intomainfrom
claude/mobile-first-redesign-5kL0W
Apr 3, 2026
Merged

Improve mobile responsiveness across UI components and layouts#61
antosubash merged 17 commits intomainfrom
claude/mobile-first-redesign-5kL0W

Conversation

@antosubash
Copy link
Copy Markdown
Owner

Summary

This PR enhances mobile responsiveness throughout the application by implementing responsive spacing, typography, and layout adjustments. The changes ensure better visual hierarchy and usability on smaller screens while maintaining the desktop experience.

Key Changes

Spacing & Layout

  • Added responsive spacing utilities (space-y-4 sm:space-y-6) to major page containers and shells
  • Updated grid layouts to be mobile-first (e.g., grid-cols-1 sm:grid-cols-2 lg:grid-cols-3)
  • Adjusted gap sizes for mobile (gap-3 sm:gap-4) across filter bars, form fields, and card grids
  • Made action button groups stack vertically on mobile (flex-col gap-2 sm:flex-row)

Typography

  • Implemented responsive heading sizes (h1: text-xl sm:text-2xl, h2: text-lg sm:text-xl, h3: text-base sm:text-lg)
  • Added responsive text sizing for dashboard stats and KPI cards

Form & Input Elements

  • Reduced padding on mobile for inputs and form fields (px-3 py-2.5 sm:px-4 sm:py-3)
  • Made select triggers full-width on mobile (w-full sm:w-[160px])
  • Updated filter form grid to start with single column on mobile

Tables & Data Display

  • Wrapped all data tables with horizontal scroll containers for mobile (overflow-x-auto -mx-4 px-4 sm:mx-0 sm:px-0)
  • Adjusted table cell padding for mobile views
  • Updated CardContent padding to be responsive (p-4 sm:p-6)

Cards & Components

  • Made card border radius responsive (rounded-xl sm:rounded-2xl)
  • Updated card padding to scale with screen size
  • Adjusted pre-formatted code block padding for mobile

Sidebar Navigation

  • Enhanced sidebar component with mobile detection via useIsMobile() hook
  • Added sidebar backdrop for mobile overlay
  • Implemented transform-based mobile sidebar animation
  • Set sidebar to hidden off-screen by default on mobile with proper transitions

Theme Updates

  • Added .table-responsive utility class for consistent table scrolling behavior
  • Updated dashboard card styling with responsive padding and sizing
  • Enhanced app sidebar styling with improved mobile transitions

Implementation Details

  • Used Tailwind's responsive prefixes (sm:, lg:) consistently throughout
  • Maintained mobile-first approach in CSS class ordering
  • Preserved existing desktop layouts while optimizing for smaller viewports
  • Added proper overflow handling for tables and long content on mobile
  • Implemented media query-based sidebar state management for better UX

https://claude.ai/code/session_01Xoj8QDK1pEeizbxLYbfP9G

Redesign the entire frontend for mobile-first responsive behavior:

Core layout changes:
- Sidebar: hidden off-screen on mobile with slide-in overlay + backdrop,
  always visible on md+ breakpoint. Added SidebarBackdrop component and
  useIsMobile hook for responsive behavior.
- PageHeader: stack title/actions vertically on mobile, side-by-side on sm+
- Container: added responsive vertical padding (py-4 sm:py-6)
- PageShell: responsive spacing (space-y-4 sm:space-y-6)
- DataGrid: horizontal scroll wrapper for tables on mobile, stacked
  pagination controls on small screens
- Theme CSS: mobile-first sidebar layout with overlay/backdrop pattern,
  responsive heading sizes, touch-friendly input padding, responsive card
  and dashboard card styling, table-responsive utility class

Module page updates (all 13 modules):
- Tables wrapped in overflow-x-auto containers for horizontal scrolling
- Filter bars stack vertically on mobile, horizontal on sm+
- Grid layouts start at 1 column, scale up at sm/md/lg breakpoints
- Form card padding reduced on mobile (p-4 sm:p-6)
- Button groups use flex-wrap for proper wrapping on narrow screens
- Detail/info rows stack vertically on mobile
- Landing page uses responsive font sizes and stacked CTA buttons
- Unify focus trap selector in PublicLayout overlay
- Return focus to trigger element on sidebar/overlay close
- Guard against duplicate event listeners on Blazor re-navigation
- Hide "Log in" button on mobile (shown in overlay instead)
- ModuleNav: hidden sm:flex → hidden md:flex
- MainLayout: hidden sm:inline-flex → hidden md:inline-flex
- Rebuild Tailwind CSS to include new component classes
The TailwindBuild msbuild target only tracked Styles/**/*.css for
incremental builds. Changes to the shared theme or Blazor layout
components wouldn't trigger a CSS rebuild. Now tracks:
- packages/SimpleModule.Theme.Default/theme.css
- framework/SimpleModule.Blazor/Components/**/*.razor
Resolve conflicts between main's i18n translations and our branch's
mobile-responsive CSS classes across 29 module page files.
The app-layout flex container was using row direction by default,
causing the mobile header and content to sit side-by-side instead
of stacking vertically. Column direction works for both mobile
(header above content) and desktop (sidebar is position:fixed).
…igation

- Add onclick handler to all sidebar links to close mobile sidebar
- Add MutationObserver to detect Inertia SPA navigations and update
  the active link highlighting client-side (since Blazor SSR layout
  is only rendered once, not on each Inertia navigation)
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 3, 2026

Deploying simplemodule-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 45afa30
Status: ✅  Deploy successful!
Preview URL: https://38a58782.simplemodule-website.pages.dev
Branch Preview URL: https://claude-mobile-first-redesign.simplemodule-website.pages.dev

View logs

@antosubash antosubash force-pushed the claude/mobile-first-redesign-5kL0W branch from c502c10 to 45afa30 Compare April 3, 2026 10:17
@antosubash antosubash enabled auto-merge (squash) April 3, 2026 10:17
@antosubash antosubash merged commit 757d4be into main Apr 3, 2026
3 of 4 checks passed
@antosubash antosubash deleted the claude/mobile-first-redesign-5kL0W branch April 3, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant